public class test526 {
    public static void main(String[] args) {
        for (int maxI = 10000; maxI <= 100000; maxI += 10000) {
            double e = 1.0;
            double item = 1.0; 
            for (int i = 1; i <= maxI; i++) {
                item /= i;
                e += item;
            }
            System.out.printf("当i=%d时，e的值为：%.10f%n", maxI, e);
        }
    }
}

